The program slicing approach does not describe the suspiciousness of statements, while the coverage analysis based fault localization approach does not analyze the relationship between statements. To solve these problems, a software fault localization approach by statistical analysis of failure context was proposed. Firstly, source code was transformed to an abstract syntax tree and program dependence graphs. Then, instrumentation was performed based on the abstract syntax tree to collect execution information. Next, starting from the failure point, dynamic program slicing based on requirement was conducted in order to get the context of failure. Finally, suspiciousness of nodes in the reverse dynamic program slice was computed, and a dynamic program slice with suspiciousness ranking was output. The proposed approach could not only describe the failure context, but also gave the suspiciousness of the statements. The experimental results show that it has an average 1.3% and 5.6% expense decrease compared with the coverage based analysis approach and the slicing approach respectively, so that it can facilitate the localization and fixing of bugs.
To achieve simple and convenient facial expression recognition, a method combining multi-scale Local Binary Pattern Histogram Fourier (LBP-HF) and Active Shape Model (ASM) was proposed. Firstly, the face regions were detected and segmented by ASM to reduce the influence of unrelated regions, and then LBP-HF were extracted to form recognition vectors. Finally, the nearest neighborhood classifier was applied to recognize expressions. The influences of various scale LBP-HF features on facial expression recognition were studied through extracting LBP-HF features from different scales. At last, multi-scale LBP-HF features were concatenated to discriminate expressions, and more effective expression features were obtained. By comparison with the experimental result of Gabor features, its feasibility and simplication are validated, and the highest mean recognition rate is 93.50%. The experimental results demonstrate that the method can be used for human-computer interaction.
To keep the trade-off of time complexity and accuracy of community detection in complex networks, Community Detection Algorithm based on Clustering Granulation (CGCDA) was proposed in this paper. The granules were regarded as communities so that the granulation for a network was actually the community partition of a network. Firstly, each node in the network was regarded as an original granule, then the granule set was obtained by the initial granulation operation. Secondly, granules in this set which satisfied granulation coefficient were merged by clustering granulation operation. The process was finished until granulation coefficient was not satisfied in the granule set. Finally, overlapping nodes among some granules were regard as isolated points, and they were merged into corresponding granules based on neighbor nodes voting algorithm to realize the community partition of complex network. Newman Fast Algorithm (NFA), Label Propagation Algorithm (LPA), CGCDA were realized on four benchmark datasets. The experimental results show that CGCDA can achieve modularity 7.6% higher than LPA and time 96% less than NFA averagely. CGCDA has lower time complexity and higher modularity. The balance between time complexity and accuracy of community detection is achieved. Compared with NFA and LPA, the whole performance of CGCDA is better.
To solve the sensor node localization problem of Wireless Sensor and Actor Network (WSAN), a range-based localization algorithm with virtual force in WSAN was proposed in this paper, in which mobile actor nodes were used instead of Wireless Sensor Network (WSN) anchors for localization algorithm, and Time Of Arrival (TOA) was combined with virtual force. In this algorithm, the actor nodes were driven under the action of virtual force and made themself move close to the sensor node which sent location request, and node localization was completed by the calculation of the distance between nodes according to the signal transmission time. The simulation results show that the localization success rate of the proposed algorithm can be improved by 20% and the average localization time and cost are less than the traditional TOA algorithm. It can apply to real-time field with small number of actor nodes.